package cn.tedu.boot15.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PipedWriter;
import java.io.PrintWriter;

@Controller
public class HelloController {
    @RequestMapping("/hello")
    public void hello(HttpServletResponse response) throws IOException {
        response.setContentType("text/html;charset=utf8");
        PrintWriter pw = response.getWriter();
        pw.println("<h1>张大帅</h1>");
        pw.close();

    }
}
